<template>
  <div>
    <el-header><PersonHeader></PersonHeader></el-header>
    <el-divider></el-divider>
    <el-container class="myCcontainer">
      <el-aside style="width: 300px;height: 100%">
        <PersonPhoto></PersonPhoto>
        <PersonMenu></PersonMenu>
      </el-aside>
      <el-main>
        <el-collapse v-model="activeNames" @change="handleChange">
          <el-collapse-item name="1">
            <template slot="title">
              <h2>求职信息</h2>
            </template>
            <el-row :gutter="18">
              <el-col :span="6" :offset="4">
                <div class="numerClass">0</div>
                <el-link class="qzclass">未查看简历</el-link>
              </el-col>
              <el-col :span="6">
                <div class="numerClass">0</div>
                <el-link class="qzclass">收到的简历</el-link>
              </el-col>
              <el-col :span="6">
                <div class="numerClass">0</div>
                <el-link class="qzclass">招聘中的职位</el-link>
              </el-col>
            </el-row>
          </el-collapse-item>
          <el-collapse-item name="2">
            <template slot="title">
              <h2>基本资料</h2>
            </template>
            <div class="qzclass">
              <el-image style="width: 250px;height: 200px;" :src="enterprise.logo" fit="fill"></el-image>
              <div><strong>{{enterprise.enterpriseName}}</strong></div>
            </div>
          </el-collapse-item>

        </el-collapse>
      </el-main>
    </el-container>
    <el-footer>
      <el-divider></el-divider>
      <el-row :gutter="20">
        <el-col :span="8" :offset="8">
          <footerx></footerx>
        </el-col>
      </el-row>
    </el-footer>
  </div>
</template>

<script>
import footerx from "../footerx";
import Personinfo from "../Personinfo";
import PersonHeader from "./components/PersonHeader";
import PersonMenu from "./components/PersonMenu";
import PersonPhoto from "./components/PersonPhoto";
import {getEnterprise} from "../../assets/util";
import {GetEnterprise} from "../../api/user";
export default {
  name: "EnterprisePage",
  components: {PersonPhoto, PersonMenu, PersonHeader, footerx,Personinfo},
  data (){
    return {
      enterprise: {
        logo:this.getImage()
      },
      activeNames: ['1','2','3']
    }
  },
  methods:{
    handleOpen(key, keyPath){
      console.log(key, keyPath);
    },
    handleClose(key, keyPath){
      console.log(key, keyPath);
    },
    getImage(){
      return getEnterprise().logo;
    },
    handleChange(val) {
      console.log(val);
    }
  },
  mounted() {
    let enterprise = getEnterprise() ;
    GetEnterprise.r(enterprise.userId).then(d=>{
      this.enterprise.logo = d.data.data.logo ;
      this.enterprise.enterpriseName = d.data.data.enterpriseName ;
    });
  }
}
</script>

<style scoped>
.myCcontainer{
  margin:0 auto;
  background: azure;
  width: 1200px;
}
.el-main{
  padding: 0px 10px;
}
.el-collapse-item__header{
  font-size: 24px;
  font-weight: bold;
  font-size: x-large;
}
h2{
  margin: 0px 10px;
}
.qzclass{
  font-size: 18px;
  font-family: '微软雅黑'!important;
  margin: 0px 10px;
}
.numerClass{
  font-size: 18px;
  margin: 0px 40px;
  font-family: '微软雅黑'!important;
  color: coral;
}
</style>